package grimbo.goodwinfooty.processing;

import grimbo.goodwinfooty.Lines2FootyMatrix;
import grimbo.goodwinfooty.service.model.FootyMatrix;

import java.util.List;
import java.util.Map;

public class UntypedList2FootyMatrixProcessor implements Processor {
	public final static String CTX_UNTYPED_LIST = "untypedList";
	public final static String CTX_FOOTY_MATRIX = "footyMatrix";

	public String process(Map context) throws Exception {
		List lines = (List) context.get(CTX_UNTYPED_LIST);
		FootyMatrix footy = new Lines2FootyMatrix()
				.createFootyMatrixFromLines(lines);
		context.put(CTX_FOOTY_MATRIX, footy);
		return null;
	}

}
